// Decompiled by Jad v1.5.7f. Copyright 2000 Pavel Kouznetsov.
// Jad home page: http://www.geocities.com/SiliconValley/Bridge/8617/jad.html
// Decompiler options: packimports(3) 
// Source File Name:   CourseStudyDSP.java

package com.iphaeton.lms.business.report;

import de.laures.cewolf.DatasetProduceException;
import de.laures.cewolf.DatasetProducer;
import de.laures.cewolf.tooltips.CategoryToolTipGenerator;
import java.io.Serializable;
import java.util.Date;
import java.util.List;
import java.util.Map;
import org.jfree.data.category.CategoryDataset;
import org.jfree.data.category.DefaultIntervalCategoryDataset;

public class CourseStudyDSP
    implements DatasetProducer, Serializable, CategoryToolTipGenerator, org.jfree.chart.labels.CategoryToolTipGenerator
{

    public CourseStudyDSP(List list)
    {
        this.list = list;
    }

    public String getProducerId()
    {
        return "CategoryDataProducer";
    }

    public boolean hasExpired(Map params, Date since)
    {
        return false;
    }

    public Object produceDataset(Map arg0)
        throws DatasetProduceException
    {
        List count = (List)list.get(1);
        String categories[] = list.get(0).toString().split(",");
        String seriesNames[] = list.get(2).toString().split(",");
        Integer startValues[][] = new Integer[seriesNames.length][categories.length];
        Integer endValues[][] = new Integer[seriesNames.length][categories.length];
        int counter = 0;
        for(int series = 0; series < seriesNames.length; series++)
        {
            for(int i = 0; i < categories.length; i++)
            {
                int y = 0;
                startValues[series][i] = new Integer(y);
                endValues[series][i] = (Integer)count.get(counter);
                counter++;
            }

        }

        DefaultIntervalCategoryDataset ds = new DefaultIntervalCategoryDataset(seriesNames, categories, startValues, endValues);
        return ds;
    }

    public String generateToolTip(CategoryDataset arg0, int arg1, int arg2)
    {
        return null;
    }

    private static final long serialVersionUID = 1L;
    private List list;
}
